//
// Created by 32827 on 2024/2/15.
//

#ifndef YZGD32_YZL_UI_WIDGET_PP_TEXT_HPP
#define YZGD32_YZL_UI_WIDGET_PP_TEXT_HPP
#include "yzl_ui_widget_pp_base.hpp"
#include "layout/yzl_ui_pp_def.hpp"
class WidgetText : public WidgetBase{
private:
    YZ_COLOR text_color=WHITE;
    uint16_t textLen=0;
    ucs2 *text=YZF_NULL_PTR;       //32
    struct FontPixel *fontPixel=YZF_NULL_PTR;
public:
    WidgetText(YZL_WIDGET *Ram, int x,int y, int z, int width, int height, utf8  *text);
    WidgetText(YZL_WIDGET *Ram, UI_Rect *rect,int z,utf8  *text);

    void drawP() override;

    void disposeP() override;

    void setText(utf8 *srcText);
    void clearTextCache();
};
#endif //YZGD32_YZL_UI_WIDGET_PP_TEXT_HPP
